package com.jgy.client;

import com.jgy.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RequestPart;
import org.springframework.web.multipart.MultipartFile;

/**
 * @author 姜光远
 * @date 2023/4/26 11:17
 */
@FeignClient("service")//读取nacos中被注册的服务
public interface FileClient {

    @PostMapping(value = "/service/file/uploadFile",produces = {MediaType.APPLICATION_JSON_UTF8_VALUE},consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
    R uploadFile(@RequestPart(value = "file") MultipartFile file);
}
